package cn.hiapi.shopkeeper.entity.activity;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author AdinZ
 * @date 2023/2/5 0:09
 */
@Entity
@Table(name = "hiapi_shopkeeper_activity_home_ad")
@ApiModel(description = "抽奖活动广告")
@Getter
@Setter
public class ActivityHomeAd extends BasicEntity {

    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;
    @ApiModelProperty("状态")
    private int status;
    @ApiModelProperty("开始时间")
    private long startTime;
    @ApiModelProperty("结束时间")
    private long endTime;
    @ApiModelProperty("广告名")
    private String title;
    @ApiModelProperty("创建时间")
    private long created = System.currentTimeMillis();
    @ApiModelProperty("更新时间")
    private long updated = System.currentTimeMillis();


}
